// demo script for Candela - Fair play to the queen

starttime 0
duration 100



palette {
	background (0.0 0.0 0 0)
	background_linemesh (0.3 0.5 0.8 0.9)

	white (1 1 1 1)
	lineglow (1 1 1 1)
	crackle (0.2 0.4 0.6 0.5)

	glow (1.0 0.6 0.3 1)
	stone (0.02 0.02 0.02 1)
	road (0.02 0.02 0.02 1)
	
	monitor_noise (0.5 0.2 0.1 0.8)
	monitor_text (0.5 0.5 0.5 0.2)
	
	elevator_tunnel (0.005 0.005 0.025 1)
	elevator_rings (0.035 0.04 0.05 1)
	elevator_platta (0.05 0.05 0.10 1)

	elevator_frame1 (0.02 0.02 0.02 1)
	elevator_frame2 (1.0 1.0 1.0 1)
	elevator_pillar (0.035 0.04 0.05 1)
	elevator_screen (0.7 0.8 1.0 1)
	
	elevator_lineglow (0.25 0.5 0.75 1)

	metaballs_circle1 (0.9 0.5 0.0 0.25)
	metaballs_circle2 (0.0 0.47 1 0.25)
	metaballs_circle3 (1.0 0.6 0.1 0.25)
	metaballs_circle4 (0.9 0.5 0.0 0.15)

	metaballs_circlewire0 (1.0 0.6 0.1 0.15)
	metaballs_circlewire1 (0.1 0.57 1 0.15)
	metaballs_circlewire2 (1.0 0.6 0.1 0.15)
	metaballs_circlewire3 (1.0 0.6 0.1 0.4)

	tunnel_base (0.1 0.1 0.15 1)
	tunnel_wire (0.25 0.2 0.07 1)

	tunnel_patch1 (0.6 0.58 0.27 1)
	tunnel_patch2 (0.6 0.48 0.18 1)
	tunnel_patch3 (0.6 0.49 0.07 1)
	tunnel_patch4 (0.6 0.39 0.01 1)
	tunnel_patch5 (0.6 0.33 0.11 1)

	//tunnel_patch1 (1 0.97 0.45 1)
	//tunnel_patch2 (1 0.8  0.3 1)
	//tunnel_patch3 (1 0.81 0.12 1)
	//tunnel_patch4 (1 0.66 0.02 1)
	//tunnel_patch5 (1 0.55 0.19 1)


	landscape_wire (0.5 0.5 0.5 0.5)


	gits_text1 (0.2 0.4 0.6 0.5)
	gits_text2 (0.6 0.4 0.2 0.5)

	gits_ringglow (0.86 0.913 0.909 1)
	gits_ring (0.25 0.4 0.388 1)

	cubes_cubebaseglow (0.08 0.08 0.08 1)
	cubes_cubeborder (0.0 0.0 0.0 1)

	slide_roaddyn (0.05 0.05 0.05 1)
	slide_roadfix (0.05 0.05 0.05 1)
	slide_sparks (0.2 0.5 1.0 1.0)
	slide_pillar_beam (0.5 0.25 0.05 0.25)
	slide_pillar_wire (0.05 0.25 0.5 0.25)


	end_door (1 1 1 1)
	end_texts (1 1 1 0.5)

}


// base clear
clear {
	name "globaltimer"
	prio 0
	color background
}

grid {
	passive
	prio 2
}

// textures
texture {
	passive
	name "t_cracklepathtexture"
	texturefile "textures/fade.tga"
}

texture {
	name "t_grid"
	texturefile "textures/rutnat.tga"
}

texture {
	name "t_particle"
	texturefile "textures/particle1.tga"
}

texture {
	passive
	name "particletexture"
	texturefile "textures/particle1.tga"
}

gitstexture {
	passive
	name "gitstexture"
	texturefile "data/textures/smallfont.tga"
}

// shaders
shader {
	name "p_dirlight"
	shaderfile "shaders/test.glsl"
}

shader {
	name "shr_robot"
	shaderfile "shaders/bones.glsl"
}

shader {
	name "shr_yfade"
	shaderfile "shaders/yfade.glsl"
}

shader {
	name "shr_tunnel"
	shaderfile "shaders/hextunnelshader.glsl"
}

// models ---------------------------

model {
	name "m_cubes"
	modelfile "objects/cubes.lwo"

	materials {
		Default {
			color (0.1 0.1 0.1 1)
		}
		"12" {
			color (0.1 0.1 0.1 1)
		}
		"33" {
			color (0.1 0.1 0.1 1)
		}
	}
}

md5anim {
	name "a_run"
	animationfile "robot/hq_run.md5anim"
	shift (0 51 0)
}

md5mesh {
	name "m_robot_md5mesh"
	meshfile "robot/hq.md5mesh"
	binarymeshfile "robot/hq.binmesh"
}

shadermesh {
	name "m_robot_mesh"
	mesh "m_robot_md5mesh"
	shader "shr_robot"
}


// global bloom
bloom {
//	passive
	prio 1000
	factor 0.3

	// ugly hack!
	factormodifyer "s_door.bloomfactor"
}

//
timedchain {
	name "main"

	part maindemo		  0.00 0 0
	part "QED"		  	160.00 0 0


	group {
		// base clear
		clear {
			prio 0
			color background
		}

	}

	group {
		name "maindemo"

		// base clear
		clear {
			prio 0
			color background
		}

		// global bloom
		bloom_ {
		//	passive
			prio 100000
			factor 0.25
		}


		timedchain {

			part scene1_elevator 	  0.00 0 0
			part scene1_camspin		 34.01 0 0 // REAL
			part scene1_firstrun     37.71 0 0 // REAL

			part run1_blipp      44.50 0 0
			part metaballs		 51.50 0 0
			part metaballs2		 55.00 0 0
			part jump			 64.00 0 0
			part tunnel			 65.09 0 0
			part land			 69.96 0 0
			part run_greets		 72.03 0 0
			part run_cubes		 85.00 0 0
			//part jump_to_slide	 97.80 0 0
			part slide1			 99.53 0 0
			// Camera Clips		125.25
			part door			126.87 0 0
			part QED			160.00 0 0

			INCLUDE "data/scene1_elevator.txt"
			INCLUDE "data/scene2_run.txt"
			INCLUDE "data/scene3_metaballs.txt"
			INCLUDE "data/scene4_fall.txt"
			INCLUDE "data/scene5_greets.txt"
			INCLUDE "data/scene6_cubes.txt"
			INCLUDE "data/scene7_slide.txt"
			INCLUDE "data/scene8_end.txt"


			group {
				name "QED"
			}
		}
	}

	group {
		name "QED"
	}
}
